from wish.pool.role_pool import RolePool

up_count = 3


def once_need_times():
    times = 0
    up_count_l = 0
    role_pool = RolePool()
    while True:
        times += 1
        role = role_pool.next()
        if role == RolePool.ROLE_4_UP_A:
            up_count_l += 1
            if up_count_l >= up_count:
                return times
        if times >= 700:
            return 700
